package com.example.ythhome.login.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.ythhome.login.entity.Menu;
import com.example.ythhome.login.service.MenuService;
import com.example.ythhome.login.mapper.MenuMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Administrator
* @description 针对表【t_menu(菜单表)】的数据库操作Service实现
* @createDate 2025-05-07 08:30:19
*/
@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu>
    implements MenuService{
    @Autowired
    MenuMapper menuMapper;
    @Override
    public List<Menu> queryMenuByUserId(Integer userId) {
        return menuMapper.queryByUserId(userId);
    }

    @Override
    public List<Menu> queryMenuByUserName(String userName) {
        return menuMapper.queryByUserName(userName);
    }
}




